package com.wires.lu.practice.gc;


import java.util.Random;

/**
 * 1
 * -Xms10m -Xmx10m -XX:+PrintGCDetails -XX:+PrintCommandLineFlags -XX:+UseSerialGC  (DefNew+Tenured)
 *2
 * -Xms10m -Xmx10m -XX:+PrintGCDetails -XX:+PrintCommandLineFlags -XX:+UseParNewGC  (ParNew+Tenured)
 */
public class GCDemo {

    public static void main(String[] args) {
        System.out.println("**************GCDemo Hello");
        try{
            String str="atguigu";
            while (true){
                str+=str+new Random().nextInt(77777777)+new Random().nextInt(88888888);
                str.intern();
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
